class CakeRenderer : public IBlockRenderer
{
public:
	ITexture *Texture;

	CakeRenderer(ITexture *texture) :
		Texture(texture)
	{
	}

	int GetTypeData(const int &data) { return data; }

	void Render(Schematic *schematic, RendererBase *renderer, const Block &block, const Point3i &position)
	{
		Box box(Texture, Point3i(14, 8, 14), Point3i(1, 8, 1));

		box.SetAll(Point2i(10 * 16 + 1, 7 * 16 + 8)).SetTop(Point2i(9 * 16 + 1, 7 * 16 + 1)).SetBottom(Point2i(12 * 16 + 1, 7 * 16 + 1));

		if (block.Data != 0)
		{
			int sideOffset = 2 * block.Data;

			box.Bounds.X -= sideOffset;
			box.Position.X += sideOffset;

			box.SetWest(Point2i(11 * 16 + 1, 7 * 16 + 8));

			Point2i offs(10 * 16 + 1 + sideOffset, 7 * 16 + 8);
			box.SetNorth(offs);
		}

		renderer->Draw(box);
	}
};